<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Venue/Venue.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/Venue/Venue.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'venue_id',
        footer: 'Foots',
        cnName: '影院列表',
        name: 'Venue',
        url: '/Venue/',
        sortName: 'venue_id',
      },
      extend: extend,
      editFormFields: {
        venuePic: [],
        venueCode: '',
        venueName: '',
        venueTxt: [],
        venueType: '',
        venueState: [],
        remark: '',
        creator: '',
        createID: '',
        createDate: '',
        modifier: '',
        modifyID: '',
        modifyDate: '',
        merchantCode: '',
        merchantName: '',
        is_open: '',
        distributorNews_id: '',
      },
      editFormOptions: [
        [
          { title: '场馆介绍图', maxSize: 1, field: 'venuePic', type: 'imgupgrade', maxFile: 1, multiple: true },
          { title: '场馆名称', field: 'venueName', type: 'text', required: true},
          { title: '场馆ID', field: 'venueCode', type: 'text' },
        ],
        [
          {
            dataKey: 'hotel_State',
            data: [],
            title: '场馆状态',
            field: 'venueState',
            type: 'select',
          },
          {
            dataKey: 'VenueMess',
            data: [],
            title: '图文介绍',
            field: 'venueTxt',
            type: 'select',
          },
          {
            dataKey: 'VenueType',
            data: [],
            title: '场馆类型',
            field: 'venueType',
            required: true,
            type: 'radio',
          },
        ],
        [
          {
            title: '是否公开',
            field: 'is_open',
            colSize: 4,
            type: 'switch',
          },
          {
            title: '直营分销商',
            dataKey: '',
            data: [],
            field: 'distributorNews_id',
            colSize: 6,
            type: 'selectList',
            hidden: true,
          },
        ],
        [{ title: '简述', field: 'remark', type: 'textarea', colSize: '12' }],
      ],
      searchFormFields: {
        venueCode: '',
        venueName: '',
        venueState: '',
        venueType: '',
      },
      searchFormOptions: [
        [
          { title: '场馆名称', field: 'venueName', type: 'like' },
          { title: '场馆ID', field: 'venueCode', type: 'like' },
          {
            dataKey: 'enable',
            data: [],
            title: '场馆状态',
            field: 'venueState',
            type: 'checkbox',
          },
          {
            dataKey: 'enable',
            data: [],
            title: '场馆类型',
            field: 'venueType',
            type: 'checkbox',
          },
        ],
      ],
      columns: [
        {
          field: 'venue_id',
          title: '主键',
          type: 'int',
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: 'left',
        },
        {
          field: 'venueCode',
          title: '场馆ID',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'venueName',
          title: '场馆名称',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'venuePic',
          title: '场馆介绍图',
          type: 'imgupgrade',
          width: 220,
          align: 'left',
        },
        {
          field: 'venueState',
          title: '场馆状态',
          type: 'int',
          bind: { key: 'hotel_State', data: [] },
          width: 90,
          align: 'left',
        },
        {
          field: 'venueTxt',
          title: '场馆图文介绍',
          type: 'string',
          bind: { key: 'VenueMess', data: [] },
          width: 220,
          align: 'left',
        },
        {
          field: 'venueType',
          title: '场馆类型',
          type: 'string',
          bind: { key: 'VenueType', data: [] },
          width: 220,
          align: 'left',
        },

        {
          field: 'createID',
          title: '创建人ID',
          type: 'int',
          width: 90,
          hidden: true,
          align: 'left',
        },
        {
          field: 'creator',
          title: '创建人',
          type: 'string',
          width: 80,
          align: 'left',
        },
        {
          field: 'createDate',
          title: '创建时间',
          type: 'datetime',
          width: 190,
          align: 'left',
          sortable: true,
        },
        {
          field: 'isSeatSelection',
          title: '是否在线选座',
          type: 'int',
          width: 90,
          align: 'left',
        },
        {
          field: 'merchantCode',
          title: '商户编码',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'merchantName',
          title: '商户名称',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'modifier',
          title: '修改人',
          type: 'string',
          width: 80,
          align: 'left',
        },
        {
          field: 'modifyDate',
          title: '修改时间',
          type: 'datetime',
          width: 190,
          align: 'left',
          sortable: true,
        },
        {
          field: 'modifyID',
          title: '修改人ID',
          type: 'int',
          width: 90,
          hidden: true,
          align: 'left',
        },
        {
          field: 'remark',
          title: '简述',
          type: 'string',
          width: 220,
          align: 'left',
        },
      ],
      detail: {
        cnName: '场馆场次',
        columns: [
          {
            field: 'screenid',
            title: '主键',
            type: 'int',
            width: 90,
            hidden: true,
            readonly: true,
            require: true,
            align: 'left',
          },
          {
            field: 'screenName',
            title: '场次名称',
            type: 'text',
            edit: { type: 'text' },
            width: 90,
            align: 'left',
            sortable: true,
            require: true,
          },
          {
            field: 'timeContainer',
            title: '起止时间段',
            type: 'is-range',
            edit: { type: 'is-range' },
            width: 300,
            align: 'left',
            sortable: true,
            require: true,
          },
          {
            field: 'cinemaareaid',
            title: '影院座位',
            type: 'text',
            width: 90,
            edit: { type: 'select' },
            bind: { key: '', data: [] },
            align: 'left',
            require: true,
          },
          {
            field: 'status',
            title: '状态',
            type: 'switch',
            width: 90,
            edit: { type: 'switch' },
            align: 'left',
            sortable: true,
            require: true,
          },
        ],
        sortName: 'createDate',
        key: 'screenid',
      },
    }
  },
}
export default vueParam
</script>
